//
//  WebViewController.m
//  新浪微博OC
//
//  Created by  justinchou on 16/2/26.
//  Copyright © 2016年  justinchou. All rights reserved.
//

#import "WebViewController.h"

@interface WebViewController ()

@end

@interface WebViewController ()

@property (nonatomic) UIWebView *webView;

@end

@implementation WebViewController

#pragma mark - 懒加载
- (UIWebView *)webView {
    if (_webView == nil) {
        _webView = [[UIWebView alloc] init];
    }
    return _webView;
}


#pragma mark - 监听事件
- (void)autoFill {
    NSLog(@"自动填充");
}
- (void)dismissVC {
    
    [self dismissViewControllerAnimated:true completion:nil];
}

#pragma mark - 生命周期
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1.0];
    
    [self setupUI];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


#pragma mark - 设置界面
- (void)setupUI {
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"自动填充" style:UIBarButtonItemStylePlain target:self action:@selector(autoFill)];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:self action:@selector(dismissVC)];
}

@end
